<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        function aaa(x, y, ...z) {
            console.log(x);
            console.log(y);
            console.log(z);
        }
        aaa(3, 2, 4, 5, 3, 3, 3);

        function bbb(...val) {
            console.log(val);
        }
        bbb(3, 2, 5, 8, 7, 9)
    </script>
</body>

</html>